package com.bgs.travelapp.card.mapper;

import com.bgs.travelapp.card.entity.CardEntity;
import com.bgs.travelapp.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CardMapper extends BaseMapper<CardEntity> {
    @Select("select * from card where id = #{id}")
    @Results(
            {@Result(property = "coverId", column = "cover_id"),
            }
    )
    CardEntity getCardImage(Integer id);
}
